package main

import "github.com/dgrijalva/jwt-go"

// Jwt json web token
type Jwt struct {
	Id   int
	Name string
	jwt.StandardClaims
}

data := Jwt{
		Id:   user.Id,
		Name: user.Name,
		StandardClaims: jwt.StandardClaims{
			ExpiresAt: time.Now().Add(2 * time.Hour).Unix(), //1970
		},
}
jwts := jwt.NewWithClaims(jwt.SigningMethodHS256, data)
token, err := jwts.SignedString([]byte(`k`))